<?php

namespace app\controller;

use think\facade\Db;
use think\facade\Request;
class System extends Common
{

    // http://www.penyou.com/System/checkVip
    public function checkVip()
    {

        $is_vip = getIsVip($this->userId);
        if ($is_vip === 0) {
            singleJson($is_vip, '请先成为会员');
        }

        $materialId = Request::param('id');

        $materialInfo = Db::name('material')->field('title,content,content_try,url,is_try,cover,duration')->where(array('id' => $materialId,'is_delete'=>0))->find();

        //   print_r($userInfo);


        singleJson($materialInfo, '生成订单异常');
    }


}
